package application;

import dataStructures.*;

/**
 * @author Carlos Duarte - 43796
 * @author Rafael Florencio - 43829
 */
public class WordClass implements Word{
	
	private static final long serialVersionUID = 1L;
	private String Vword;
	private String type;
	private List<Integer> linePosition;
	private int count;
	
	public WordClass(String Rword, String state, int value){
		Vword = Rword;
		type = state;
		linePosition = new DoublyLinkedList<Integer>();
		count=0;
		SetTime(value);
	}
	@Override
	public String GetWord() {
		// TODO Auto-generated method stub
		return Vword;
	}
	
	@Override
	public String GetType() {
		// TODO Auto-generated method stub
		return type;
	}

	@Override
	public void SetWord(String word) {
		// TODO Auto-generated method stub
		Vword = word;
	}
	@Override
	public Iterator<Integer> GetLine() {
		// TODO Auto-generated method stub
		return linePosition.iterator();
	}
	@Override
	public void SetTime(int line) {
		// TODO Auto-generated method stub
		count++;
		linePosition.addLast(line);
	}
	
	@Override
	public int countTimes() {
		// TODO Auto-generated method stub
		return count;
	}
}
